<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
    <style>
        .box{
            width: 200px;
            height: 100px;
            background-color: rgb(253, 12, 12);
        }
        .brown{
            background-color: brown;
        }
        .blue{
            background-color: blue;
        }
        .pink{
            background-color: pink;
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- 1.直接类名是一个变量 -->
        <div :class="className">box</div>
        <!-- 2.二个样式之间进行选择 -->
        <ul class="one">
            <li :class="index % 2 == 0 ? 'brown' : 'blue'" v-for="(item,index) in 6">{{item}}</li>
        </ul>
        <ul class="two">
            <li :class="[item % 2 == 1 ? 'brown' : 'blue']" v-for="(item) in 6">{{item}}</li>
        </ul>
        <ul>
            <li :class="{'brown':item % 3 == 1,blue:item % 3 == 2,pink: item % 3 == 0}" v-for="(item) in 9">{{item}}</li>
        </ul>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                className:"box"
            }
        })
    </script>
</body>
</html>